package org.example.rvo;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Setter
@Getter
@ToString
public class ResultVO {
    private String resCode;
    private String resMsg;

    private Object resData;

    public ResultVO(String resCode, String resMsg, Object resData) {
        this.resCode = resCode;
        this.resMsg = resMsg;
        this.resData = resData;
    }

    public ResultVO(String resCode, String resMsg) {
        this.resCode = resCode;
        this.resMsg = resMsg;
    }

    public static ResultVO success(String resCode, String resMsg, Object resData){
        return  new ResultVO(resCode, resMsg, resData);
    }

    public static ResultVO success(String resCode, String resMsg){
        return  new ResultVO(resCode, resMsg);
    }

    public static ResultVO failure(String resCode, String resMsg){
        return  new ResultVO(resCode, resMsg);
    }

}
